package com.demo5;

public class AnimalDemo {
    public static void main(String[] args) {
        Jumping jump = new Cat();

        jump.jump();

        Animal animal = new Cat();
        animal.setAge(20);
        animal.setName("TOM");
        System.out.println(animal.getName()+":"+animal.getAge());
        animal.eat();

        System.out.println("------------------");

        Cat cat = new Cat();

        cat.setAge(10);
        cat.setName("加菲加菲");

        cat.eat();
        cat.jump();
    }
}
